﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Admin_companyLink :  OTS.AdminBasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        this.TestPurview(HttpContext.Current, OTS.enumSysRight.CompanyLink);
        if (!Page.IsPostBack)
        {
            OTS.BLL.CompanyLinkBLL bll = new OTS.BLL.CompanyLinkBLL();
            OTS.Model.company_link model = bll.GetModel();
            this.Editor_content.Text = model.lContent;
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        OTS.Model.company_link model = new OTS.Model.company_link();
        OTS.Model.SessionUser sUser = this.getSessionUser(HttpContext.Current);
        model.lContent = this.Editor_content.Text;
        model.modifyTime = OTS.Common.Help.GetCurrentTime();
        model.uid = sUser.uid;
        OTS.BLL.CompanyLinkBLL bll = new OTS.BLL.CompanyLinkBLL();
        if (bll.Update(model))
        {
            OTS.Common.Jscript.Alert("更新成功！");
        }
        else
        {
            OTS.Common.Jscript.Alert("更新失败！");
        }


    }
}
